﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace machine_registration.Converter
{
    /// <summary>
    /// 转大写转换器
    /// </summary>
    public class ToUpperConverter : IValueConverter
    {
        // 输入转大写
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value?.ToString()?.ToUpperInvariant();
        }

        // 反向转换（如果双向绑定需要）
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return value?.ToString()?.ToUpperInvariant();
        }
    }
}
